package com.example.shiro.intercept;

import com.example.sys.authority.model.SysAuthorityConstant;
import com.example.sys.module.service.SysModuleRoleService;
import org.springframework.stereotype.Service;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

@Service
public class AuthEditorValidator extends AbstractAccessControlFilter {
    @Override
    protected boolean isAccessAllowed(ServletRequest servletRequest, ServletResponse servletResponse, Object mappedValue) throws Exception {
        return this.validator(servletRequest, servletResponse, SysModuleRoleService.EDIT, SysAuthorityConstant.EDITER);
    }
}
